package database;

import java.sql.Connection;

/**
 * Abstract handler class which is inherited by all specific handlers
 * Contains the database connection
 * @author Martin Schophaus
 *
 */
public abstract class Handler {
	private Connection db;
	
	/**
	 * Constructor which sets the database connection
	 * @param db 
	 */
	public Handler(Connection db) {
		this.setDb(db);
	}
	
	/**
	 * 
	 * @return Returns the database connection
	 */
	public Connection getDb() {
		return db;
	}
	
	/**
	 * sets the database connection
	 * @param db
	 */
	public void setDb(Connection db) {
		this.db = db;
	}
	
}
